<?php /* Smarty version Smarty-3.1.12, created on 2016-05-17 09:42:09
         compiled from "/home/weixincn86dwleoi1xmibn6cinm896/wwwroot/dm/xycms/page.tpl" */ ?>
<?php /*%%SmartyHeaderCode:2092388742573a76f1731e83-40813392%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '425d9a2463ba4ab1e437c618ebc8bc1522fff37f' => 
    array (
      0 => '/home/weixincn86dwleoi1xmibn6cinm896/wwwroot/dm/xycms/page.tpl',
      1 => 1447035496,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '2092388742573a76f1731e83-40813392',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'page_charset' => 0,
    'copyright_author' => 0,
    'action' => 0,
    'page_category' => 0,
    'volist' => 0,
    'data' => 0,
    'cate' => 0,
    'thirdlist' => 0,
    'cate_select' => 0,
    'orders' => 0,
    'flag_checkbox' => 0,
    'comeurl' => 0,
    'id' => 0,
    'volpage' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.12',
  'unifunc' => 'content_573a76f1a840b3_94562945',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_573a76f1a840b3_94562945')) {function content_573a76f1a840b3_94562945($_smarty_tpl) {?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $_smarty_tpl->tpl_vars['page_charset']->value;?>
" />
<title>自定义单页</title>
<meta name="author" content="<?php echo $_smarty_tpl->tpl_vars['copyright_author']->value;?>
" />
<link type="text/css" rel="stylesheet" href="xycms/css/admin.css" media="screen" />
<link type="text/css" rel="stylesheet" href="xycms/css/other.css" />
<script type='text/javascript' src='js/jquery-1.8.3.min.js'></script>
<script type='text/javascript' src='js/command.js'></script>
<link rel="stylesheet" href="../data/ueditor/themes/default/css/ueditor.css" type="text/css" />
<script type="text/javascript" charset="utf-8" src="../data/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="../data/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript" charset="utf-8" src="../data/ueditor/lang/zh-cn/zh-cn.js"></script>
<script src="js/jquery.cookie.js"></script>
</head>
<body>
<?php if ($_smarty_tpl->tpl_vars['action']->value==''){?>
<div class="main-wrap">
  <div class="path"><p>当前位置：内容中心<span>&gt;</span>公司概况</p></div>
  <div class="main-cont">
    <h3 class="title"><a href="xycms_page.php?action=add" class="btn-general">添加概况</a>公司概况</h3>
    <form action="xycms_page.php" method="post" name="myform" id="myform" style="margin:0">
    <input type="hidden" name="action" id="action" value="del" />
    <div class="tab">
  	<ul class="tab_li">
  		<?php  $_smarty_tpl->tpl_vars['volist'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['volist']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['page_category']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['volist']->key => $_smarty_tpl->tpl_vars['volist']->value){
$_smarty_tpl->tpl_vars['volist']->_loop = true;
?>
  			<li><?php echo $_smarty_tpl->tpl_vars['volist']->value['cname'];?>
</li>
  		<?php } ?>
  	</ul>
  	<div class="tab_content">
  		<?php  $_smarty_tpl->tpl_vars['cate'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['cate']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['data']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['cate']->key => $_smarty_tpl->tpl_vars['cate']->value){
$_smarty_tpl->tpl_vars['cate']->_loop = true;
?>
  		  <div class="contentlist">
  			<table width="100%" border="0" cellpadding="0" cellspacing="0" class="table" align="center">
  				<thead class="tb-tit-bg">
				  <tr>
					<th width="10%">所属分类</th>
					<th width="15%">概况名称</th>
					<th width="10%">自定义目录</th>
					<th width="8%">排序</th>
					<th width="6%">状态</th>
					<th width="10%">打开方式</th>
					<th width="10%">链接类型</th>
					<th width="15%">URL</th>
					<th>操作</th>
				  </tr>
			  </thead>
  		<?php  $_smarty_tpl->tpl_vars['volist'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['volist']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['cate']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['volist']->key => $_smarty_tpl->tpl_vars['volist']->value){
$_smarty_tpl->tpl_vars['volist']->_loop = true;
?>
	    <tr onmouseover="overColor(this)" onmouseout="outColor(this)">
	    <td align="center"><?php echo $_smarty_tpl->tpl_vars['volist']->value['cname'];?>
</td>
		<td align="left">
		<?php if ($_smarty_tpl->tpl_vars['volist']->value['catdir']=='about'){?>
			<a href="../about/<?php echo $_smarty_tpl->tpl_vars['volist']->value['word'];?>
.html" target="_blank"><?php echo $_smarty_tpl->tpl_vars['volist']->value['title'];?>
</a>
		<?php }else{ ?>
			<a href="../about_<?php echo $_smarty_tpl->tpl_vars['volist']->value['catdir'];?>
/<?php echo $_smarty_tpl->tpl_vars['volist']->value['word'];?>
.html" target="_blank"><?php echo $_smarty_tpl->tpl_vars['volist']->value['title'];?>
</a>
		<?php }?>
		</td>
		<td align="center"><?php echo $_smarty_tpl->tpl_vars['volist']->value['word'];?>
</td>	
		<td align="center"><?php echo $_smarty_tpl->tpl_vars['volist']->value['orders'];?>
</td>
		<td align="center">
		<?php if ($_smarty_tpl->tpl_vars['volist']->value['flag']==0){?>
			<input type="hidden" id="attr_flag<?php echo $_smarty_tpl->tpl_vars['volist']->value['id'];?>
" value="flagopen" />
			<img id="flag<?php echo $_smarty_tpl->tpl_vars['volist']->value['id'];?>
" src="xycms/images/no.gif" onclick="javascript:fetch_ajax('flag','<?php echo $_smarty_tpl->tpl_vars['volist']->value['id'];?>
');" style="cursor:pointer;" />
		<?php }else{ ?>
			<input type="hidden" id="attr_flag<?php echo $_smarty_tpl->tpl_vars['volist']->value['id'];?>
" value="flagclose" />
			<img id="flag<?php echo $_smarty_tpl->tpl_vars['volist']->value['id'];?>
" src="xycms/images/yes.gif" onclick="javascript:fetch_ajax('flag','<?php echo $_smarty_tpl->tpl_vars['volist']->value['id'];?>
');" style="cursor:pointer;" />	
		<?php }?>
        </td>
		<td align="center"><?php if ($_smarty_tpl->tpl_vars['volist']->value['target']==1){?><font color="green">本页</font><?php }else{ ?><font color="blue">新页面</font><?php }?></td>
		<td align="center"><?php if ($_smarty_tpl->tpl_vars['volist']->value['linktype']==1){?><font color="green">站内</font><?php }else{ ?><font color="blue">站外</font><?php }?></td>
		<td align="left"><?php echo $_smarty_tpl->tpl_vars['volist']->value['linkurl'];?>
</td>
		<td align="center"><a href="xycms_page.php?action=edit&id=<?php echo $_smarty_tpl->tpl_vars['volist']->value['id'];?>
" class="icon-edit">修改</a>&nbsp;&nbsp;<a href="xycms_page.php?action=del&id[]=<?php echo $_smarty_tpl->tpl_vars['volist']->value['id'];?>
" onclick="{if(confirm('确定要删除该信息?')){return true;} return false;}" class="icon-del">删除</a></td>
	  </tr>
	  <?php if (empty($_smarty_tpl->tpl_vars['volist']->value['chil_cate'])){?><?php }else{ ?>
	  <?php  $_smarty_tpl->tpl_vars['thirdlist'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['thirdlist']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['volist']->value['chil_cate']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['thirdlist']->key => $_smarty_tpl->tpl_vars['thirdlist']->value){
$_smarty_tpl->tpl_vars['thirdlist']->_loop = true;
?>
	    <tr onmouseover="overColor(this)" onmouseout="outColor(this)">
	    <td align="center"><?php echo $_smarty_tpl->tpl_vars['thirdlist']->value['cname'];?>
</td>
		<td align="left">
		<?php if ($_smarty_tpl->tpl_vars['thirdlist']->value['catdir']=='about'){?>
			<a href="../about/<?php echo $_smarty_tpl->tpl_vars['thirdlist']->value['word'];?>
.html" target="_blank">├&nbsp;<?php echo $_smarty_tpl->tpl_vars['thirdlist']->value['title'];?>
</a>
		<?php }else{ ?>
			<a href="../about_<?php echo $_smarty_tpl->tpl_vars['thirdlist']->value['catdir'];?>
/<?php echo $_smarty_tpl->tpl_vars['thirdlist']->value['word'];?>
.html" target="_blank">├&nbsp;<?php echo $_smarty_tpl->tpl_vars['thirdlist']->value['title'];?>
</a>
		<?php }?>
		</td>
		<td align="center"><?php echo $_smarty_tpl->tpl_vars['thirdlist']->value['word'];?>
</td>	
		<td align="center"><?php echo $_smarty_tpl->tpl_vars['thirdlist']->value['orders'];?>
</td>
		<td align="center">
		<?php if ($_smarty_tpl->tpl_vars['thirdlist']->value['flag']==0){?>
			<input type="hidden" id="attr_flag<?php echo $_smarty_tpl->tpl_vars['thirdlist']->value['id'];?>
" value="flagopen" />
			<img id="flag<?php echo $_smarty_tpl->tpl_vars['thirdlist']->value['id'];?>
" src="xycms/images/no.gif" onclick="javascript:fetch_ajax('flag','<?php echo $_smarty_tpl->tpl_vars['thirdlist']->value['id'];?>
');" style="cursor:pointer;" />
		<?php }else{ ?>
			<input type="hidden" id="attr_flag<?php echo $_smarty_tpl->tpl_vars['thirdlist']->value['id'];?>
" value="flagclose" />
			<img id="flag<?php echo $_smarty_tpl->tpl_vars['thirdlist']->value['id'];?>
" src="xycms/images/yes.gif" onclick="javascript:fetch_ajax('flag','<?php echo $_smarty_tpl->tpl_vars['thirdlist']->value['id'];?>
');" style="cursor:pointer;" />	
		<?php }?>
        </td>
		<td align="center"><?php if ($_smarty_tpl->tpl_vars['thirdlist']->value['target']==1){?><font color="green">本页</font><?php }else{ ?><font color="blue">新页面</font><?php }?></td>
		<td align="center"><?php if ($_smarty_tpl->tpl_vars['thirdlist']->value['linktype']==1){?><font color="green">站内</font><?php }else{ ?><font color="blue">站外</font><?php }?></td>
		<td align="left"><?php echo $_smarty_tpl->tpl_vars['thirdlist']->value['linkurl'];?>
</td>
		<td align="center"><a href="xycms_page.php?action=edit&id=<?php echo $_smarty_tpl->tpl_vars['thirdlist']->value['id'];?>
" class="icon-edit">修改</a>&nbsp;&nbsp;<a href="xycms_page.php?action=del&id[]=<?php echo $_smarty_tpl->tpl_vars['thirdlist']->value['id'];?>
" onclick="{if(confirm('确定要删除该信息?')){return true;} return false;}" class="icon-del">删除</a></td>
	  </tr>
	  <?php } ?>
	  <?php }?>
	  	  <?php }
if (!$_smarty_tpl->tpl_vars['volist']->_loop) {
?>
      <tr>
	    <td colspan="9" align="center">暂无信息</td>
	  </tr>
  				<?php } ?>
  			</table>
  	</div>
  		<?php } ?>
  	</div>
  	
  	
  	
	</div>

	</form>
	</div>
  </div>
<script>
(function($){	
	var tab = parseInt($.cookie('tab'));
	// alert($('.tab_content > .contentlist').length + "--" +tab);
	if(!tab){
		$('.tab_li > li').first().addClass('on');
		$('.tab_content > .contentlist').first().addClass('on');
	}else{
		if($('.tab_content > .contentlist').length < tab + 1){
			$.cookie('tab', 0);
			tab = 0;
		}
		$('.tab_li > li').eq(tab).addClass('on').siblings('li').removeClass('on');
		$('.tab_content > .contentlist').eq(tab).addClass('on').siblings('.contentlist').removeClass('on');
	}
})($);
</script>
<?php }?>

<?php if ($_smarty_tpl->tpl_vars['action']->value=="add"){?>
<div class="main-wrap">
  <div class="path"><p>当前位置：内容中心<span>&gt;</span>公司概况</p></div>
  <div class="main-cont">
	<h3 class="title"><a href="xycms_page.php" class="btn-general">返回列表</a>添加概况</h3>
    <form name="myform" id="myform" method="post" action="xycms_page.php" onsubmit='return checkform(1);' >
    <input type="hidden" name="action" value="saveadd" />
	<table class='table_form'>
	  <tr>
		<th width="110">概况分类 <span class='f_red'>*</span></th>
		<td><?php echo $_smarty_tpl->tpl_vars['cate_select']->value;?>
 <span id="dcateid" class='f_red'></span></td>
	  </tr>
	  <tr>
		<th>概况名称 <span class="f_red">*</span> </th>
		<td><input type="text" name="title" id="title" class="input-txt" /> <span id='dtitle' class='f_red'></span></td>
	  </tr>
	  <tr>
		<th>自定义分类目录：<span class='f_red'>*</span></th>
		<td>
		<input type="text" name="word" id="word" class="input-txt word_url" /> 
		<span id="word_btn">自动获取</span>
		<span class='f_red' id="wordname"></span>( 必须是是英文字符串组成 )	
		</td>
	  </tr>
	  <tr>
		<th>打开方式 <span class="f_red"></span> </th>
		<td><input type="radio" name="target" id="target" value="1" checked="checked" />本页，<input type="radio" name="target" id="target" value="2" />新页面</td>
	  </tr>
	  <tr>
		<th>链接类型 <span class="f_red"></span> </th>
		<td><input type="radio" name="linktype" id="linktype" value="1" checked="checked" />站内，<input type="radio" name="linktype" id="linktype" value="2" />站外</td>
	  </tr>
	  <tr>
		<th>站外URL <span class="f_red"></span> </th>
		<td><input type="text" name="linkurl" id="linkurl" class="input-txt" /> <span id='dlinkurl' class='f_red'></span></td>
	  </tr>
	  <tr>
		<th>页面排序 <span class="f_red"></span> </th>
		<td><input type="text" name="orders" id="orders" class="input-s" value="<?php echo $_smarty_tpl->tpl_vars['orders']->value;?>
" /> <span id='dorders' class='f_red'></span></td>
	  </tr>
	  <tr>
		<th>状态设置 </th>
		<td><?php echo $_smarty_tpl->tpl_vars['flag_checkbox']->value;?>
</td>
	  </tr>
	  <tr>
		<th>页面内容 <span class="f_red"></span></th>
		<td>
		  <script id="container" name="content" type="text/javascript"></script>
		  <script type="text/javascript">var ue = UE.getEditor('container');</script>
		  <span id='dcontent' class='f_red'></span>
		</td>
	  </tr>
	  <tr>
		<th></th>
		<td><input type="submit" name="btn_save" class="button" value="添加保存" /></td>
	  </tr>
	</table>
	</form>
  </div>
  <div style="clear:both;"></div>
</div>
<?php }?>

<?php if ($_smarty_tpl->tpl_vars['action']->value=="edit"){?>
<div class="main-wrap">
  <div class="path"><p>当前位置：内容中心<span>&gt;</span>公司概况</p></div>
  <div class="main-cont">
	<h3 class="title"><a href="xycms_page.php?<?php echo $_smarty_tpl->tpl_vars['comeurl']->value;?>
" class="btn-general">返回列表</a>编辑概况</h3>
    <form name="myform" id="myform" method="post" action="xycms_page.php" onsubmit='return checkform();' >
    <input type="hidden" name="action" value="saveedit" />
	<input type="hidden" name="id" value="<?php echo $_smarty_tpl->tpl_vars['id']->value;?>
" />
	<table class='table_form'>
	  <tr>
		<th width="110">概况分类 <span class='f_red'>*</span></th>
		<td><?php echo $_smarty_tpl->tpl_vars['cate_select']->value;?>
 <span id="dcateid" class='f_red'></span></td>
	  </tr>
	  <tr>
		<th>概况名称 <span class="f_red">*</span> </th>
		<td><input type="text" name="title" id="title" class="input-txt" value="<?php echo $_smarty_tpl->tpl_vars['volpage']->value['title'];?>
" /> <span id='dtitle' class='f_red'></span></td>
	  </tr>
	  <tr>
		<th>自定义分类目录：<span class='f_red'>*</span></th>
		<td>
		<input type="text" name="word" id="word" class="input-txt word_url" value="<?php echo $_smarty_tpl->tpl_vars['volpage']->value['word'];?>
" /> 
		<span id="word_btn">自动获取</span>
		<span class='f_red' id="wordname"></span>( 必须是是英文字符串组成 )	
		</td>
	  </tr>
	  <tr>
		<th>打开方式 <span class="f_red"></span> </th>
		<td><input type="radio" name="target" class="target" value="1" />本页，<input type="radio" name="target" class="target" value="2" />新页面</td>
	  </tr>
	  <tr>
		<th>链接类型 <span class="f_red"></span> </th>
		<td><input type="radio" name="linktype" class="linktype" value="1" />站内，<input type="radio" name="linktype" class="linktype" value="2" />站外</td>
	  </tr>
	  <tr>
		<th>站外URL <span class="f_red"></span> </th>
		<td><input type="text" name="linkurl" id="linkurl" class="input-txt" value="<?php echo $_smarty_tpl->tpl_vars['volpage']->value['linkurl'];?>
" /> <span id='dlinkurl' class='f_red'></span></td>
	  </tr>
	  <tr>
		<th>页面排序 <span class="f_red"></span> </th>
		<td><input type="text" name="orders" id="orders" class="input-s" value="<?php echo $_smarty_tpl->tpl_vars['volpage']->value['orders'];?>
" /> <span id='dorders' class='f_red'></span></td>
	  </tr>
	  <tr>
		<th>状态设置 </th>
		<td><?php echo $_smarty_tpl->tpl_vars['flag_checkbox']->value;?>
</td>
	  </tr>
	  <tr>
		<th>页面内容 <span class="f_red"></span></th>
		<td>
		  <script id="container" name="content" type="text/javascript"><?php echo $_smarty_tpl->tpl_vars['volpage']->value['content'];?>
</script>
		  <script type="text/javascript">var ue = UE.getEditor('container');</script>
		  <span id='dcontent' class='f_red'></span>
		</td>
	  </tr>
	  <tr>
		<th></th>
		<td><input type="submit" name="btn_save" class="button" value="更新保存" /></td>
	  </tr>
	</table>
	</form>
  </div>
  <div style="clear:both;"></div>
</div>
<script type="text/javascript">
//链接内型和打开方式		
$(function(){
if(<?php echo $_smarty_tpl->tpl_vars['volpage']->value['linktype'];?>
 == 1){
  $(".linktype:eq(0)").attr("checked",true);
  }else{
  $(".linktype:eq(1)").attr("checked",true);
   }
if(<?php echo $_smarty_tpl->tpl_vars['volpage']->value['target'];?>
 == 1){
	  $(".target:eq(0)").attr("checked",true);
}else{
	  $(".target:eq(1)").attr("checked",true);
}     
 });
</script> 
<?php }?> 

<script type="text/javascript" src="js/check.js"></script>
</body>
</html><?php }} ?>